from selenium import webdriver
import time
'''日志自动填写系统'''

#打开火狐浏览器
driver = webdriver.Firefox()

#打开ERP网页
driver.get("http://ioa.99.com/Main_Default.aspx")

inputUname = driver.find_element_by_id("Username")

#处于登录页面的话， 进行登录操作
if inputUname!=None:
    inputPwd = driver.find_element_by_id("Password2")
    btnSubmit = driver.find_element_by_class_name("btn_login")

    inputUname.send_keys("255055")
    inputPwd = driver.find_element_by_id("Password2")
    inputPwd.send_keys("Liwenhu76")

    btnSubmit.click()
    time.sleep(1.5)


#点开日志标签
tabMylog = driver.find_element_by_id("link_1312002")
tabMylog.click()

time.sleep(2)


'''


btnMyLog = driver.find_element_by_id("link_1312002")
btnMyLog.click()'''